//
//  MagazineHistotyCell.m
//  JianChaRiBao
//
//  Created by Changxy on 13-7-31.
//  Copyright (c) 2013年 wzyk. All rights reserved.
//

#import "MagazineHistotyCell.h"
#import "UIImageView+WebCache.h"
@implementation MagazineHistotyCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)getCellWithDict:(NSDictionary *)dict{
//    NSLog(@"1:%@ 2:%@ 3:%@",[dict objectForKey:@"sourcenum"],[dict objectForKey:@"magazinename"],[dict objectForKey:@"keywords"]);
    titleLabel.text = [dict objectForKey:@"magazinename"];
    dateLable.text = [dict objectForKey:@"sourcenum"];
    headImage.layer.shadowColor = [UIColor blackColor].CGColor;
    headImage.layer.shadowOpacity = 0.45;
    headImage.layer.shadowOffset = CGSizeMake(0, 6);
    headImage.layer.shadowPath = [UIBezierPath bezierPathWithRect:headImage.bounds].CGPath;
    headImage.layer.masksToBounds = NO;

    [headImage setImageWithURL:[dict objectForKey:@"image"] placeholderImage:[UIImage imageNamed:@"default_image.png"]];
}

- (void)dealloc {
    [titleLabel release];
    [dateLable release];
    [headImage release];
    [super dealloc];
}
@end
